package com.hj.authority.feign.fallback;

import com.alibaba.fastjson2.JSON;
import com.hj.authority.domain.query.ThreeReq;
import com.hj.authority.feign.RemoteStorageService;
import com.hj.response.resp.RestfulResult;
import org.springframework.stereotype.Component;

/**
 * @author hj
 * @Date 2023/5/20
 * @Description:
 */
@Component
public class RemoteStorageServiceImpl implements RemoteStorageService {

    @Override
    public String randomOne(String name) {
        System.out.println("one");
        RestfulResult<String> result=new RestfulResult<>();
        result.setCode(500);
        result.setMsg("fail");
        result.setData("限流了~one");
        return JSON.toJSONString(result);
    }

    @Override
    public RestfulResult<String> randomTwo(String name) {
        System.out.println("two");
        RestfulResult<String> result=new RestfulResult<>();
        result.setCode(500);
        result.setMsg("fail");
        result.setData("限流了~two");
        return result;
    }

    @Override
    public String randomThree(ThreeReq req) {
        System.out.println("three");
        RestfulResult<String> result=new RestfulResult<>();
        result.setCode(500);
        result.setMsg("fail");
        result.setData("限流了~three");
        return JSON.toJSONString(result);
    }

    @Override
    public String randomFour(ThreeReq req) {
        System.out.println("four");
        RestfulResult<String> result=new RestfulResult<>();
        result.setCode(500);
        result.setMsg("fail");
        result.setData("限流了~four");
        return JSON.toJSONString(result);
    }


}
